package com.zhongbei.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/zhongbeis")
public class UsersController {

//    get  地址：/zhongbei/hello   返回的响应：zhongbei hello

    @GetMapping("/hellos")
    public String hello(){
        return "zhongbei hello";
    }

    @GetMapping("/selectUsername")
    public String selectUsername(){
        return "好好学习";
    }

    @GetMapping("/test/{name}")
    public String test(@PathVariable String name){
        return "天天向上"+name;
    }

    @PostMapping("/test2/{name}")
    public String test2(@PathVariable String name){
        return "谢娜" + name + "post";
    }


}
